package com.mf.ergate.api.bo.pt;

import com.mf.ergate.api.ApiConfig;
import com.mf.ergate.api.bo.pt.model.dto.PtOrderHelpSendCreateDto;
import com.mf.ergate.api.bo.pt.model.dto.PtOrderHelpSendDeleteDto;
import com.mf.ergate.api.bo.pt.model.dto.PtOrderHelpSendQueryDto;
import com.mf.ergate.api.bo.pt.model.dto.PtOrderHelpSendUpdateDto;
import com.mf.ergate.api.bo.pt.model.vo.PtOrderHelpSendVo;
import com.mf.framework.common.model.Page;
import com.mf.framework.common.model.RemotePage;
import com.mf.framework.common.model.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 跑腿订单帮送RemoteService层接口类
 * User: zhaoming
 * DateTime: 2019-01-28
 * To change this template use File | Settings | File Templates.
 **/
@Api(value = "/api/ptOrderHelpSend", tags = "PtOrderHelpSendController", description = "跑腿订单帮送服务")
@FeignClient(name= ApiConfig.SERVICE_NAME)
@RequestMapping("/api/ptOrderHelpSend")
public interface PtOrderHelpSendRemoteService{

    /**
     * 新增
     * @param ptOrderHelpSendCreateDto 跑腿订单帮送新增Dto
     * @return 跑腿订单帮送
     */
    @ApiOperation(value = "新增")
    @ApiImplicitParam(name = "ptOrderHelpSendCreateDto", value = "跑腿订单帮送新增Dto", dataType = "PtOrderHelpSendCreateDto",  required = true, paramType = "body")
    @RequestMapping(value = "/insert", method = RequestMethod.POST)
    Result<PtOrderHelpSendVo> insert(@RequestBody PtOrderHelpSendCreateDto ptOrderHelpSendCreateDto);

    /**
     * 根据唯一编号更新
     * @param ptOrderHelpSendUpdateDto 跑腿订单帮送更新Dto
     * @return 执行结果
     */
    @ApiOperation(value = "根据唯一编号更新")
    @ApiImplicitParam(name = "ptOrderHelpSendUpdateDto", value = "跑腿订单帮送更新Dto", dataType = "PtOrderHelpSendUpdateDto",  required = true, paramType = "body")
    @RequestMapping(value = "/updateByUniqueNo", method = RequestMethod.POST)
    Result<Boolean> updateByUniqueNo(@RequestBody PtOrderHelpSendUpdateDto ptOrderHelpSendUpdateDto);

    /**
     * 根据唯一编号删除(逻辑删除)
     * @param ptOrderHelpSendDeleteDto 跑腿订单帮送删除Dto
     * @return 执行结果
     */
    @ApiOperation(value = "根据唯一编号删除(逻辑删除)")
    @ApiImplicitParam(name = "ptOrderHelpSendDeleteDto", value = "跑腿订单帮送删除Dto", dataType = "PtOrderHelpSendDeleteDto",  required = true, paramType = "body")
    @RequestMapping(value = "/deleteByUniqueNo", method = RequestMethod.POST)
    Result<Boolean> deleteByUniqueNo(@RequestBody PtOrderHelpSendDeleteDto ptOrderHelpSendDeleteDto);

    /**
     * 根据唯一编号查询
     * @param uniqueNo 唯一编号
     * @return 跑腿订单帮送
     */
    @ApiOperation(value = "根据唯一编号查询")
    @ApiImplicitParam(name = "uniqueNo", value = "唯一编号", dataType = "String",  required = true, paramType = "body")
    @RequestMapping(value = "/selectByUniqueNo", method = RequestMethod.POST)
    Result<PtOrderHelpSendVo> selectByUniqueNo(@RequestBody String uniqueNo);

    /**
     * 根据条件查询
     * @param ptOrderHelpSendQueryDto 跑腿订单帮送查询Dto
     * @return 跑腿订单帮送列表
     */
    @ApiOperation(value = "根据条件查询")
    @ApiImplicitParam(name = "ptOrderHelpSendQueryDto", value = "跑腿订单帮送查询Dto", dataType = "PtOrderHelpSendQueryDto",  required = true, paramType = "body")
    @RequestMapping(value = "/selectByCondition", method = RequestMethod.POST)
    Result<List<PtOrderHelpSendVo>> selectByCondition(@RequestBody PtOrderHelpSendQueryDto ptOrderHelpSendQueryDto);

    /**
     * 根据条件查询数量
     * @param ptOrderHelpSendQueryDto 跑腿订单帮送查询Dto
     * @return 数量
     */
    @ApiOperation(value = "根据条件查询数量")
    @ApiImplicitParam(name = "ptOrderHelpSendQueryDto", value = "跑腿订单帮送查询Dto", dataType = "PtOrderHelpSendQueryDto",  required = true, paramType = "body")
    @RequestMapping(value = "/selectCount", method = {RequestMethod.POST})
    Result<Integer> selectCount(@RequestBody PtOrderHelpSendQueryDto ptOrderHelpSendQueryDto);

    /**
     * 根据条件分页查询
     * @param remotePage 远程分页
     * @return 跑腿订单帮送分页列表
     */
    @ApiOperation(value = "根据条件分页查询")
    @ApiImplicitParam(name = "remotePage", value = "远程分页", dataType = "RemotePage",  required = true, paramType = "body")
    @RequestMapping(value = "/selectPage", method = {RequestMethod.POST})
    Result<Page<PtOrderHelpSendVo>> selectPage(@RequestBody RemotePage<PtOrderHelpSendQueryDto> remotePage);
}
